home *** CD-ROM | disk | FTP | other *** search
/ Chip 1996 November / CHIP Kasım 1996.iso / prog / gvpd / iffflat.des < prev    next >
Text File  |  1994-09-27  |  4KB  |  271 lines

  1. #
  2. # This Descriptor file models a Sun Rasterfile
  3. # Note that 12/32 bit files are not "real rasterfiles"
  4. # but is inserted for 12/floating data support
  5. #
  6.  
  7. #
  8. # Bilevel file
  9. #
  10. IFFCL_BILEVEL {
  11.     bits:    1
  12. # Sun rasterfile magic number
  13.     byte:    @0=0x59
  14.     byte:    @1=0xa6
  15.     byte:    @2=0x6a
  16.     byte:    @3=0x95
  17.  
  18.     width:    @4=slong
  19.     height:    @8=slong
  20.  
  21. # See if 1 bit
  22.     byte:    @12=0
  23.     byte:    @13=0
  24.     byte:    @14=0
  25.     byte:    @15=1
  26.  
  27.     byte:    @23=1
  28.  
  29. # No palette
  30.     byte:    @24=0
  31.     byte:    @25=0
  32.     byte:    @26=0
  33.     byte:    @27=0
  34. # No map length
  35.     byte:    @28=0
  36.     byte:    @29=0
  37.     byte:    @30=0
  38.     byte:    @31=0
  39.  
  40.     start_offset:    32
  41.     line_offset:    ((width+15)/16)*2
  42. }
  43.  
  44. #
  45. # Normal Gray scale
  46. #
  47. IFFCL_GRAY {
  48.     bits:    8
  49. # Sun rasterfile magic number
  50.     byte:    @0=0x59
  51.     byte:    @1=0xa6
  52.     byte:    @2=0x6a
  53.     byte:    @3=0x95
  54.  
  55.     width:    @4=slong
  56.     height:    @8=slong
  57.  
  58. # See if 8 bits
  59.     byte:    @12=0
  60.     byte:    @13=0
  61.     byte:    @14=0
  62.     byte:    @15=8
  63.  
  64.     byte:    @23=1
  65.  
  66. # No palette
  67.     byte:    @24=0
  68.     byte:    @25=0
  69.     byte:    @26=0
  70.     byte:    @27=0
  71. # No map length
  72.     byte:    @28=0
  73.     byte:    @29=0
  74.     byte:    @30=0
  75.     byte:    @31=0
  76.  
  77.     start_offset:    32
  78.     line_offset:    ((width*bits+15)/16)*2
  79. }
  80.  
  81. #
  82. # Normal palette
  83. #
  84. IFFCL_PALETTE {
  85.     bits:    8
  86. # Sun rasterfile magic number
  87.     byte:    @0=0x59
  88.     byte:    @1=0xa6
  89.     byte:    @2=0x6a
  90.     byte:    @3=0x95
  91.  
  92.     width:    @4=slong
  93.     height:    @8=slong
  94.  
  95. # See if 8 bits
  96.     byte:    @12=0
  97.     byte:    @13=0
  98.     byte:    @14=0
  99.     byte:    @15=8
  100.  
  101.     byte:    @23=1
  102.  
  103. # Raw palette
  104.     byte:    @24=0
  105.     byte:    @25=0
  106.     byte:    @26=0
  107.     byte:    @27=2
  108. # Length of palette
  109.     byte:    @28=0
  110.     byte:    @29=0
  111.     byte:    @30=3
  112.     byte:    @31=0
  113.  
  114.     palette:    32
  115.  
  116.     start_offset:    32+768
  117.     line_offset:    ((width*bits+15)/16)*2
  118. }
  119.  
  120. #
  121. # True color
  122. #
  123. IFFCL_RGB {
  124.     bits:    8
  125. # Sun rasterfile magic number
  126.     byte:    @0=0x59
  127.     byte:    @1=0xa6
  128.     byte:    @2=0x6a
  129.     byte:    @3=0x95
  130.  
  131.     width:    @4=slong
  132.     height:    @8=slong
  133.  
  134. # See if 24 bits
  135.     byte:    @12=0
  136.     byte:    @13=0
  137.     byte:    @14=0
  138.     byte:    @15=24
  139.  
  140.     byte:    @23=1
  141.  
  142. # No palette
  143.     byte:    @24=0
  144.     byte:    @25=0
  145.     byte:    @26=0
  146.     byte:    @27=0
  147. # No map length
  148.     byte:    @28=0
  149.     byte:    @29=0
  150.     byte:    @30=0
  151.     byte:    @31=0
  152.  
  153.     start_offset:    34
  154.     sample_offset:    -1
  155.     sample_offset1:    -1
  156.     next_sample:    3
  157.     line_offset:    ((width*24+15)/16)*2
  158. }
  159.  
  160.  
  161. #
  162. # For Gray Scale12
  163. #
  164. IFFCL_GRAY {
  165.     bits:    12
  166. # Sun rasterfile magic number
  167.     byte:    @0=0x59
  168.     byte:    @1=0xa6
  169.     byte:    @2=0x6a
  170.     byte:    @3=0x95
  171.  
  172.     width:    @4=slong
  173.     height:    @8=slong
  174.  
  175. # See if 12 bits
  176.     byte:    @12=0
  177.     byte:    @13=0
  178.     byte:    @14=0
  179.     byte:    @15=12
  180.  
  181.     byte:    @23=1
  182.  
  183. # No palette
  184.     byte:    @24=0
  185.     byte:    @25=0
  186.     byte:    @26=0
  187.     byte:    @27=0
  188. # No map length
  189.     byte:    @28=0
  190.     byte:    @29=0
  191.     byte:    @30=0
  192.     byte:    @31=0
  193.  
  194.     start_offset:    32
  195.     line_offset:    ((width*bits+15)/16)*2
  196. }
  197.  
  198. #
  199. # For Floating point
  200. #
  201. IFFCL_GRAY {
  202.     bits:    32
  203. # Sun rasterfile magic number
  204.     byte:    @0=0x59
  205.     byte:    @1=0xa6
  206.     byte:    @2=0x6a
  207.     byte:    @3=0x95
  208.  
  209.     width:    @4=slong
  210.     height:    @8=slong
  211.  
  212. # See if 32 bits
  213.     byte:    @12=0
  214.     byte:    @13=0
  215.     byte:    @14=0
  216.     byte:    @15=32
  217.  
  218.     byte:    @23=1
  219.  
  220. # No palette
  221.     byte:    @24=0
  222.     byte:    @25=0
  223.     byte:    @26=0
  224.     byte:    @27=0
  225. # No map length
  226.     byte:    @28=0
  227.     byte:    @29=0
  228.     byte:    @30=0
  229.     byte:    @31=0
  230.  
  231.     start_offset:    32
  232.     line_offset:    ((width*bits+15)/16)*2
  233. }
  234.  
  235. #
  236. # For Gray Scale16
  237. #
  238. IFFCL_GRAY {
  239.     bits:    16
  240. # Sun rasterfile magic number
  241.     byte:    @0=0x59
  242.     byte:    @1=0xa6
  243.     byte:    @2=0x6a
  244.     byte:    @3=0x95
  245.  
  246.     width:    @4=slong
  247.     height:    @8=slong
  248.  
  249. # See if 16 bits
  250.     byte:    @12=0
  251.     byte:    @13=0
  252.     byte:    @14=0
  253.     byte:    @15=16
  254.  
  255.     byte:    @23=1
  256.  
  257. # No palette
  258.     byte:    @24=0
  259.     byte:    @25=0
  260.     byte:    @26=0
  261.     byte:    @27=0
  262. # No map length
  263.     byte:    @28=0
  264.     byte:    @29=0
  265.     byte:    @30=0
  266.     byte:    @31=0
  267.  
  268.     start_offset:    32
  269.     line_offset:    ((width*bits+15)/16)*2
  270. }
  271.